load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "boost.math",
    hdrs = glob(
        [
            "include/**/*.hpp",
            "include/**/*.ipp",
        ],
        exclude = [
            "include/boost/math/*/detail/**/*.hpp",
            "include/boost/math/bindings/mpfr.hpp",
            "include/boost/math/bindings/mpreal.hpp",
            "include/boost/math/bindings/rr.hpp",
            "include/boost/math/ccmath/*.hpp",
            "include/boost/math/concepts/distributions.hpp",
            "include/boost/math/constants/calculate_constants.hpp",
            "include/boost/math/cstdfloat/cstdfloat_complex_std.hpp",
            "include/boost/math/differentiation/autodiff_cpp11.hpp",
            "include/boost/math/differentiation/lanczos_smoothing.hpp",
            "include/boost/math/distributions/empirical_cumulative_distribution_function.hpp",
            "include/boost/math/filters/daubechies.hpp",
            "include/boost/math/interpolators/cardinal_quadratic_b_spline.hpp",
            "include/boost/math/interpolators/cardinal_quintic_b_spline.hpp",
            "include/boost/math/interpolators/cardinal_trigonometric.hpp",
            "include/boost/math/optimization/*.hpp",
            "include/boost/math/quadrature/wavelet_transforms.hpp",
            "include/boost/math/special_functions/bessel_iterators.hpp",
            "include/boost/math/special_functions/chebyshev_transform.hpp",
            "include/boost/math/special_functions/daubechies_scaling.hpp",
            "include/boost/math/special_functions/daubechies_wavelet.hpp",
            "include/boost/math/special_functions/fourier_transform_daubechies.hpp",
            "include/boost/math/special_functions/rsqrt.hpp",
            "include/boost/math/special_functions/detail/lambert_w_lookup_table.ipp",
            "include/boost/math/statistics/signal_statistics.hpp",
            "include/boost/math/tools/bivariate_statistics.hpp",
            "include/boost/math/tools/centered_continued_fraction.hpp",
            "include/boost/math/tools/color_maps.hpp",
            "include/boost/math/tools/engel_expansion.hpp",
            "include/boost/math/tools/luroth_expansion.hpp",
            "include/boost/math/tools/norms.hpp",
            "include/boost/math/tools/recurrence.hpp",
            "include/boost/math/tools/signal_statistics.hpp",
            "include/boost/math/tools/simple_continued_fraction.hpp",
            "include/boost/math/tools/univariate_statistics.hpp",
        ],
    ),
    features = [
        "parse_headers",
    ],
    includes = ["include"],
    textual_hdrs = [
        "include/boost/math/bindings/mpfr.hpp",
        "include/boost/math/bindings/mpreal.hpp",
        "include/boost/math/bindings/rr.hpp",
        "include/boost/math/concepts/distributions.hpp",
        "include/boost/math/constants/calculate_constants.hpp",
        "include/boost/math/cstdfloat/cstdfloat_complex_std.hpp",
        "include/boost/math/differentiation/autodiff_cpp11.hpp",
        "include/boost/math/differentiation/lanczos_smoothing.hpp",
        "include/boost/math/distributions/empirical_cumulative_distribution_function.hpp",
        "include/boost/math/filters/daubechies.hpp",
        "include/boost/math/interpolators/cardinal_quadratic_b_spline.hpp",
        "include/boost/math/interpolators/cardinal_quintic_b_spline.hpp",
        "include/boost/math/interpolators/cardinal_trigonometric.hpp",
        "include/boost/math/quadrature/wavelet_transforms.hpp",
        "include/boost/math/special_functions/bessel_iterators.hpp",
        "include/boost/math/special_functions/chebyshev_transform.hpp",
        "include/boost/math/special_functions/daubechies_scaling.hpp",
        "include/boost/math/special_functions/daubechies_wavelet.hpp",
        "include/boost/math/special_functions/fourier_transform_daubechies.hpp",
        "include/boost/math/special_functions/rsqrt.hpp",
        "include/boost/math/special_functions/detail/lambert_w_lookup_table.ipp",
        "include/boost/math/statistics/signal_statistics.hpp",
        "include/boost/math/tools/bivariate_statistics.hpp",
        "include/boost/math/tools/centered_continued_fraction.hpp",
        "include/boost/math/tools/color_maps.hpp",
        "include/boost/math/tools/engel_expansion.hpp",
        "include/boost/math/tools/luroth_expansion.hpp",
        "include/boost/math/tools/norms.hpp",
        "include/boost/math/tools/recurrence.hpp",
        "include/boost/math/tools/signal_statistics.hpp",
        "include/boost/math/tools/simple_continued_fraction.hpp",
        "include/boost/math/tools/univariate_statistics.hpp",
    ] + glob([
        "include/boost/math/*/detail/**/*.hpp",
        "include/boost/math/ccmath/*.hpp",
        "include/boost/math/optimization/*.hpp",
    ]),
    visibility = ["//visibility:public"],
    deps = [
        "@boost.assert",
        "@boost.concept_check",
        "@boost.config",
        "@boost.core",
        "@boost.integer",
        "@boost.lexical_cast",
        "@boost.predef",
        "@boost.random",
        "@boost.static_assert",
        "@boost.throw_exception",
    ],
)
